<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<jsp:include page="../../base.jsp"></jsp:include>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>新闻列表</title>
<script>
	$(function(){
		loadList('/S3H3L3/news/getAllnewsList.do');
		$('#newsList').datagrid('resize', {
			width:1000,
			height:500
		});
	});
	
	//加载列表
	function loadList(u) {
		$('#newsList').datagrid({
			title:'新闻列表',
			nowrap: false,
			striped: true,
			collapsible:true,
			url:u,
			sortName: 'id',
			sortOrder: 'desc',
			remoteSort: false,
			idField:'id',
			columns:[[
				{field:'ck',checkbox:true},
				{field:'title',title:'标题',width:200},
				{field:'author',title:'作者',width:50},
				{field:'keyword',title:'关键字',width:240},
				{field:'digest',title:'摘要',width:450}
			]],
			pagination:true,
			rownumbers:true,
		});
	}
	
	function refreshList() {
		$('#newsList').datagrid('reload');
	}
	
	function fullTextSearch() {
		var condition = $('#condition').val();
		if (condition == '') {
			alert('检索条件不能为空！');
			return;
		}
		loadList("/S3H3L3/news/fullTextSearch.do?condition=" + condition);
	}
</script>
</head>
<body>
<div>
	<input type="text" name="condition" id="condition">
	<a href="#" onclick="fullTextSearch();">全文检索</a>
</div>
<table id="newsList"></table>
<div id="newsEditWindow" class="easyui-window"  closable="true" collapsible="false" minimizable="false"
	maximizable="false" modal="true" closed="true" style="width: 340px; height: 400px;">
	<iframe id="editIframe" style="height:99%;width:100%" frameborder="0"
		scrolling="auto">
	</iframe>
</div>
</body>
</html>